<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        .button {
            width: 100px;
            height: 30px;
            line-height: 30px;
            position: relative;
            border: none;
            outline:none;
            cursor: pointer;
            background-color: transparent;
        }
        .button span{
           position: absolute;
            top: 0;
            left: 0;
            z-index: 2;
            width: 100%;
            height: 100%;
            text-align: center;
        }
        .button::after, .button::before {
            background-color: red;
            content: "";
            position: absolute;
            width: 0;
            height: 100%;
            transition: all 0.35s ease;
        }
        .button::before {
            top: 0;
            left: 0;

        }
        .button::after {
            top:0;
            right: 0;
        }
        .button:hover:after, .button:hover:before {
            width: 50%;
            height: 100%;
        }
    </style>
</head>
<body>
<button class="button"><span>返回</span></button>
</body>
</html>